<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>获取时间戳,并转化输出格式类似:2012-12-1 13:00:00 35</title>
</head>
<body>
    <script>
       var arr=new Date()
       var Str=arr.getFullYear()+"-"+(arr.getMonth()+1)+"-"+(arr.getDate())+':'+(arr.getHours())+':'+(arr.getMinutes())+':'+(arr.getSeconds())+' '+(arr.getTime())
        console.log(Str)
    </script>
</body>
</html>